﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Web;
using System.Xml;

namespace UTLBASEFORM
{
    public partial class MDICHILD : DevComponents.DotNetBar.Office2007Form
    {
        //const text lable for control
        public const string TextLabelExit = "&Thoát";
        public const string TextLabelHelp = "Trợ Giúp";
        public const string TextLabelSave = "&Lưu";
        public const string TextLabelReset = "Làm Lạ&i";
        public const string TextLabelDelete = "&Xóa";
        public const string TextLabelEdit = "&Sửa";
        public const string TextLabelAdd = "T&hêm";
        //const image name
        public const string ImageNameCheck_Ok = "Check_Ok";
        public const string ImageNameSave = "";
        public const string ImageNameReset = "";
        public const string ImageNameEdit = "";
        public const string ImageNameDelete = "";
        public const string ImageNameUpdate = "";

        public const string ImageNameHelp = "";
        public const string ImageNameExit = "";

        protected bool HasChange = false;

        public MDICHILD()
        {
            InitializeComponent();
            btn1.Click += new EventHandler(btn1_Click);
            btn2.Click += new EventHandler(btn2_Click);
            btn3.Click += new EventHandler(btn3_Click);
            btn4.Click += new EventHandler(btn4_Click);
            btn5.Click += new EventHandler(btn5_Click);
            btn6.Click += new EventHandler(btn6_Click);
            btn7.Click += new EventHandler(btn7_Click);
            btn8.Click += new EventHandler(btn8_Click);
            btn9.Click += new EventHandler(btn9_Click);
            btn10.Click += new EventHandler(btn10_Click);
            btnESC.Click += new EventHandler(BTNESC_Click);
            btnF1.Click += new EventHandler(BTNF1_Click);
            btnF2.Click += new EventHandler(BTNF2_Click);
            btnF3.Click += new EventHandler(BTNF3_Click);
            btnF4.Click += new EventHandler(BTNF4_Click);
            btnF5.Click += new EventHandler(BTNF5_Click);
            btnF6.Click += new EventHandler(BTNF6_Click);
            btnF7.Click += new EventHandler(BTNF7_Click);
            btnF8.Click += new EventHandler(BTNF8_Click);
            btnF9.Click += new EventHandler(BTNF9_Click);
            btnF10.Click += new EventHandler(BTNF10_Click);
            btnF11.Click += new EventHandler(BTNF11_Click);
            btnF12.Click += new EventHandler(BTNF12_Click);

        }
        #region BTN1 Define
        /// <summary>
        /// BTN 2 Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param> 
        public virtual void btn1_Click(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// BTN 1 Show.
        /// </summary>
        /// <param name="textlabel">Lable to show to screen of the button</param>
        ///<param name="imgname">Image name to show</param>
        public void ShowBTN1(string textlabel, string imgname)
        {
            this.btn1.Visible = true;
            this.btn1.Text = textlabel;
            //Bitmap temp = new Bitmap(Image.FromHbitmap(global::UTLBASEFORM.Properties.Resources.Check_Ok.GetHbitmap()));

            //temp.MakeTransparent(temp.GetPixel(0, 0));
            this.btn1.Image = getImage(imgname);//(Image)temp;
            this.btn1.Tooltip = textlabel;

        }
        /// <summary>
        /// BTN 1 Hide.
        /// </summary>
        public void HideBTN1()
        {
            this.btn1.Visible = false;
        }
        /// <summary>
        /// BTN 1 Enable.
        /// </summary>
        public void EnableBTN1()
        {
            this.btn1.Enabled = true;
        }
        /// <summary>
        /// BTN 1 Disable.
        /// </summary>
        public void DisableBTN1()
        {
            this.btn1.Enabled = false;
        }
        #endregion
        #region BTN2 Define
        /// <summary>
        /// BTN 2 Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>        
        public virtual void btn2_Click(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// BTN 2 Show.
        /// </summary>
        /// <param name="textlabel">Lable to show to screen of the button</param>
        ///<param name="imgname">Image name to show</param>
        public void ShowBTN2(string textlabel, string imgname)
        {
            this.btn2.Visible = true;
            this.btn2.Text = textlabel;
            this.btn2.Image = getImage(imgname);
            this.btn2.Tooltip = textlabel;
        }
        /// <summary>
        /// BTN 2 Hide.
        /// </summary>        
        public void HideBTN2()
        {
            this.btn2.Visible = false;
        }
        /// <summary>
        /// BTN 2 Enable.
        /// </summary>
        public void EnableBTN2()
        {
            this.btn2.Enabled = true;
        }
        /// <summary>
        /// BTN 2 Disable.
        /// </summary>
        public void DisableBTN2()
        {
            this.btn2.Enabled = false;
        }
        #endregion
        #region BTN3 Define
        /// <summary>
        /// BTN 3 Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>        
        public virtual void btn3_Click(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// BTN 3 Show.
        /// </summary>
        /// <param name="textlabel">Lable to show to screen of the button</param>
        ///<param name="imgname">Image name to show</param>
        public void ShowBTN3(string textlabel, string imgname)
        {
            this.btn3.Visible = true;
            this.btn3.Text = textlabel;
            this.btn3.Image = getImage(imgname);
            this.btn3.Tooltip = textlabel;
        }
        /// <summary>
        /// BTN 3 Hide.
        /// </summary>        
        public void HideBTN3()
        {
            this.btn3.Visible = false;
        }
        /// <summary>
        /// BTN 3 Enable.
        /// </summary>
        public void EnableBTN3()
        {
            this.btn3.Enabled = true;
        }
        /// <summary>
        /// BTN 3 Disable.
        /// </summary>
        public void DisableBTN3()
        {
            this.btn3.Enabled = false;
        }
        #endregion
        #region BTN4 Define
        /// <summary>
        /// BTN 4 Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>        
        public virtual void btn4_Click(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// BTN 4 Show.
        /// </summary>
        /// <param name="textlabel">Lable to show to screen of the button</param>
        ///<param name="imgname">Image name to show</param>
        public void ShowBTN4(string textlabel, string imgname)
        {
            this.btn4.Visible = true;
            this.btn4.Text = textlabel;
            this.btn4.Image = getImage(imgname);
            this.btn4.Tooltip = textlabel;
        }
        /// <summary>
        /// BTN 4 Hide.
        /// </summary>        
        public void HideBTN4()
        {
            this.btn4.Visible = false;
        }
        /// <summary>
        /// BTN 4 Enable.
        /// </summary>
        public void EnableBTN4()
        {
            this.btn4.Enabled = true;
        }
        /// <summary>
        /// BTN 4 Disable.
        /// </summary>
        public void DisableBTN4()
        {
            this.btn4.Enabled = false;
        }
        #endregion
        #region BTN5 Define
        /// <summary>
        /// BTN 5 Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>        
        public virtual void btn5_Click(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// BTN 5 Show.
        /// </summary>
        /// <param name="textlabel">Lable to show to screen of the button</param>
        ///<param name="imgname">Image name to show</param>
        public void ShowBTN5(string textlabel, string imgname)
        {
            this.btn5.Visible = true;
            this.btn5.Text = textlabel;
            this.btn5.Image = getImage(imgname);
            this.btn5.Tooltip = textlabel;
        }
        /// <summary>
        /// BTN 5 Hide.
        /// </summary>        
        public void HideBTN5()
        {
            this.btn5.Visible = false;
        }
        /// <summary>
        /// BTN 5 Enable.
        /// </summary>
        public void EnableBTN5()
        {
            this.btn5.Enabled = true;
        }
        /// <summary>
        /// BTN 5 Disable.
        /// </summary>
        public void DisableBTN5()
        {
            this.btn5.Enabled = false;
        }
        #endregion
        #region BTN6 Define
        /// <summary>
        /// BTN 6 Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>        
        public virtual void btn6_Click(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// BTN 6 Show.
        /// </summary>
        /// <param name="textlabel">Lable to show to screen of the button</param>
        ///<param name="imgname">Image name to show</param>
        public void ShowBTN6(string textlabel, string imgname)
        {
            this.btn6.Visible = true;
            this.btn6.Text = textlabel;
            this.btn6.Image = getImage(imgname);
            this.btn6.Tooltip = textlabel;
        }
        /// <summary>
        /// BTN 6 Hide.
        /// </summary>        
        public void HideBTN6()
        {
            this.btn6.Visible = false;
        }
        /// <summary>
        /// BTN 6 Enable.
        /// </summary>
        public void EnableBTN6()
        {
            this.btn6.Enabled = true;
        }
        /// <summary>
        /// BTN 6 Disable.
        /// </summary>
        public void DisableBTN6()
        {
            this.btn6.Enabled = false;
        }
        #endregion
        #region BTN7 Define
        /// <summary>
        /// BTN 7 Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>        
        public virtual void btn7_Click(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// BTN 7 Show.
        /// </summary>
        /// <param name="textlabel">Lable to show to screen of the button</param>
        ///<param name="imgname">Image name to show</param>
        public void ShowBTN7(string textlabel, string imgname)
        {
            this.btn7.Visible = true;
            this.btn7.Text = textlabel;
            this.btn7.Image = getImage(imgname);
            this.btn7.Tooltip = textlabel;
        }
        /// <summary>
        /// BTN 7 Hide.
        /// </summary>        
        public void HideBTN7()
        {
            this.btn7.Visible = false;
        }
        /// <summary>
        /// BTN 7 Enable.
        /// </summary>
        public void EnableBTN7()
        {
            this.btn7.Enabled = true;
        }
        /// <summary>
        /// BTN 7 Disable.
        /// </summary>
        public void DisableBTN7()
        {
            this.btn7.Enabled = false;
        }
        #endregion
        #region BTN8 Define
        /// <summary>
        /// BTN 8 Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>        
        public virtual void btn8_Click(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// BTN 8 Show.
        /// </summary>
        /// <param name="textlabel">Lable to show to screen of the button</param>
        ///<param name="imgname">Image name to show</param>
        public void ShowBTN8(string textlabel, string imgname)
        {
            this.btn8.Visible = true;
            this.btn8.Text = textlabel;
            this.btn8.Image = getImage(imgname);
            this.btn8.Tooltip = textlabel;
        }
        /// <summary>
        /// BTN 8 Hide.
        /// </summary>        
        public void HideBTN8()
        {
            this.btn8.Visible = false;
        }
        /// <summary>
        /// BTN 8 Enable.
        /// </summary>
        public void EnableBTN8()
        {
            this.btn8.Enabled = true;
        }
        /// <summary>
        /// BTN 8 Disable.
        /// </summary>
        public void DisableBTN8()
        {
            this.btn8.Enabled = false;
        }
        #endregion
        #region BTN9 Define
        /// <summary>
        /// BTN 9 Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>        
        public virtual void btn9_Click(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// BTN 9 Show.
        /// </summary>
        /// <param name="textlabel">Lable to show to screen of the button</param>
        ///<param name="imgname">Image name to show</param>
        public void ShowBTN9(string textlabel, string imgname)
        {
            this.btn9.Visible = true;
            this.btn9.Text = textlabel;
            this.btn9.Image = getImage(imgname);
            this.btn9.Tooltip = textlabel;
        }
        /// <summary>
        /// BTN 9 Hide.
        /// </summary>        
        public void HideBTN9()
        {
            this.btn9.Visible = false;
        }
        /// <summary>
        /// BTN 9 Enable.
        /// </summary>
        public void EnableBTN9()
        {
            this.btn9.Enabled = true;
        }
        /// <summary>
        /// BTN 9 Disable.
        /// </summary>
        public void DisableBTN9()
        {
            this.btn9.Enabled = false;
        }
        #endregion
        #region BTN10 Define
        /// <summary>
        /// BTN 10 Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>        
        public virtual void btn10_Click(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// BTN 10 Show.
        /// </summary>
        /// <param name="textlabel">Lable to show to screen of the button</param>
        ///<param name="imgname">Image name to show</param>
        public void ShowBTN10(string textlabel, string imgname)
        {
            this.btn10.Visible = true;
            this.btn10.Text = textlabel;
            this.btn10.Image = getImage(imgname);
            this.btn10.Tooltip = textlabel;
        }
        /// <summary>
        /// BTN 10 Hide.
        /// </summary>        
        public void HideBTN10()
        {
            this.btn10.Visible = false;
        }
        /// <summary>
        /// BTN 10 Enable.
        /// </summary>
        public void EnableBTN10()
        {
            this.btn10.Enabled = true;
        }
        /// <summary>
        /// BTN 10 Disable.
        /// </summary>
        public void DisableBTN10()
        {
            this.btn10.Enabled = false;
        }
        #endregion

        #region FORM
        public void ShowMenuBar()
        {
            this.ToolBarChild.Visible = true;
        }
        public void HideMenuBar()
        {
            this.ToolBarChild.Visible = false;
        }
        #endregion

        private Image getImage(string imgname)
        {
            switch (imgname)
            {
                case "Check_Ok":
                    return global::UTLBASEFORM.Properties.Resources.Check_Ok;
                default:
                    return null;
            }

        }

        #region BTNESC Define
        /// <summary>
        /// BTNESC Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param> 
        public virtual void BTNESC_Click(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// BTNESC Show.
        /// </summary>
        /// <param name="textlabel">Lable to show to screen of the button</param>
        ///<param name="imgname">Image name to show</param>
        public void ShowBTNESC(string textlabel, string imgname)
        {
            this.btnESC.Visible = true;
            this.btnESC.Text = textlabel;
            this.btnESC.Image = getImage(imgname);
            this.btnESC.Tooltip = textlabel;
        }
        /// <summary>
        /// BTNESC Hide.
        /// </summary>
        public void HideBTNESC()
        {
            this.btnESC.Visible = false;
        }
        /// <summary>
        /// BTNESC Enable.
        /// </summary>
        public void EnableBTNESC()
        {
            this.btnESC.Enabled = true;
        }
        /// <summary>
        /// BTNESC Disable.
        /// </summary>
        public void DisableBTNESC()
        {
            this.btnESC.Enabled = false;
        }
        #endregion
        #region BTNF1 Define
        /// <summary>
        /// BTNF1 Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param> 
        public virtual void BTNF1_Click(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// BTNF1 Show.
        /// </summary>
        /// <param name="textlabel">Lable to show to screen of the button</param>
        ///<param name="imgname">Image name to show</param>
        public void ShowBTNF1(string textlabel, string imgname)
        {
            this.btnF1.Visible = true;
            this.btnF1.Text = textlabel;
            this.btnF1.Image = getImage(imgname);
            this.btnF1.Tooltip = textlabel;
        }
        /// <summary>
        /// BTNF1 Hide.
        /// </summary>
        public void HideBTNF1()
        {
            this.btnF1.Visible = false;
        }
        /// <summary>
        /// BTNF1 Enable.
        /// </summary>
        public void EnableBTNF1()
        {
            this.btnF1.Enabled = true;
        }
        /// <summary>
        /// BTNF1 Disable.
        /// </summary>
        public void DisableBTNF1()
        {
            this.btnF1.Enabled = false;
        }
        #endregion
        #region BTNF2 Define
        /// <summary>
        /// BTNF2 Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param> 
        public virtual void BTNF2_Click(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// BTNF2 Show.
        /// </summary>
        /// <param name="textlabel">Lable to show to screen of the button</param>
        ///<param name="imgname">Image name to show</param>
        public void ShowBTNF2(string textlabel, string imgname)
        {
            this.btnF2.Visible = true;
            this.btnF2.Text = textlabel;
            this.btnF2.Image = getImage(imgname);
            this.btnF2.Tooltip = textlabel;
        }
        /// <summary>
        /// BTNF2 Hide.
        /// </summary>
        public void HideBTNF2()
        {
            this.btnF2.Visible = false;
        }
        /// <summary>
        /// BTNF2 Enable.
        /// </summary>
        public void EnableBTNF2()
        {
            this.btnF2.Enabled = true;
        }
        /// <summary>
        /// BTNF2 Disable.
        /// </summary>
        public void DisableBTNF2()
        {
            this.btnF2.Enabled = false;
        }
        #endregion
        #region BTNF3 Define
        /// <summary>
        /// BTNF3 Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param> 
        public virtual void BTNF3_Click(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// BTNF3 Show.
        /// </summary>
        /// <param name="textlabel">Lable to show to screen of the button</param>
        ///<param name="imgname">Image name to show</param>
        public void ShowBTNF3(string textlabel, string imgname)
        {
            this.btnF3.Visible = true;
            this.btnF3.Text = textlabel;
            this.btnF3.Image = getImage(imgname);
            this.btnF3.Tooltip = textlabel;
        }
        /// <summary>
        /// BTNF3 Hide.
        /// </summary>
        public void HideBTNF3()
        {
            this.btnF3.Visible = false;
        }
        /// <summary>
        /// BTNF3 Enable.
        /// </summary>
        public void EnableBTNF3()
        {
            this.btnF3.Enabled = true;
        }
        /// <summary>
        /// BTNF3 Disable.
        /// </summary>
        public void DisableBTNF3()
        {
            this.btnF3.Enabled = false;
        }
        #endregion
        #region BTNF4 Define
        /// <summary>
        /// BTNF4 Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param> 
        public virtual void BTNF4_Click(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// BTNF4 Show.
        /// </summary>
        /// <param name="textlabel">Lable to show to screen of the button</param>
        ///<param name="imgname">Image name to show</param>
        public void ShowBTNF4(string textlabel, string imgname)
        {
            this.btnF4.Visible = true;
            this.btnF4.Text = textlabel;
            this.btnF4.Image = getImage(imgname);
            this.btnF4.Tooltip = textlabel;
        }
        /// <summary>
        /// BTNF4 Hide.
        /// </summary>
        public void HideBTNF4()
        {
            this.btnF4.Visible = false;
        }
        /// <summary>
        /// BTNF4 Enable.
        /// </summary>
        public void EnableBTNF4()
        {
            this.btnF4.Enabled = true;
        }
        /// <summary>
        /// BTNF4 Disable.
        /// </summary>
        public void DisableBTNF4()
        {
            this.btnF4.Enabled = false;
        }
        #endregion
        #region BTNF5 Define
        /// <summary>
        /// BTNF5 Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param> 
        public virtual void BTNF5_Click(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// BTNF5 Show.
        /// </summary>
        /// <param name="textlabel">Lable to show to screen of the button</param>
        ///<param name="imgname">Image name to show</param>
        public void ShowBTNF5(string textlabel, string imgname)
        {
            this.btnF5.Visible = true;
            this.btnF5.Text = textlabel;
            this.btnF5.Image = getImage(imgname);
            this.btnF5.Tooltip = textlabel;
        }
        /// <summary>
        /// BTNF5 Hide.
        /// </summary>
        public void HideBTNF5()
        {
            this.btnF5.Visible = false;
        }
        /// <summary>
        /// BTNF5 Enable.
        /// </summary>
        public void EnableBTNF5()
        {
            this.btnF5.Enabled = true;
        }
        /// <summary>
        /// BTNF5 Disable.
        /// </summary>
        public void DisableBTNF5()
        {
            this.btnF5.Enabled = false;
        }
        #endregion
        #region BTNF6 Define
        /// <summary>
        /// BTNF6 Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param> 
        public virtual void BTNF6_Click(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// BTNF6 Show.
        /// </summary>
        /// <param name="textlabel">Lable to show to screen of the button</param>
        ///<param name="imgname">Image name to show</param>
        public void ShowBTNF6(string textlabel, string imgname)
        {
            this.btnF6.Visible = true;
            this.btnF6.Text = textlabel;
            this.btnF6.Image = getImage(imgname);
            this.btnF6.Tooltip = textlabel;
        }
        /// <summary>
        /// BTNF6 Hide.
        /// </summary>
        public void HideBTNF6()
        {
            this.btnF6.Visible = false;
        }
        /// <summary>
        /// BTNF6 Enable.
        /// </summary>
        public void EnableBTNF6()
        {
            this.btnF6.Enabled = true;
        }
        /// <summary>
        /// BTNF6 Disable.
        /// </summary>
        public void DisableBTNF6()
        {
            this.btnF6.Enabled = false;
        }
        #endregion
        #region BTNF7 Define
        /// <summary>
        /// BTNF7 Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param> 
        public virtual void BTNF7_Click(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// BTNF7 Show.
        /// </summary>
        /// <param name="textlabel">Lable to show to screen of the button</param>
        ///<param name="imgname">Image name to show</param>
        public void ShowBTNF7(string textlabel, string imgname)
        {
            this.btnF7.Visible = true;
            this.btnF7.Text = textlabel;
            this.btnF7.Image = getImage(imgname);
            this.btnF7.Tooltip = textlabel;
        }
        /// <summary>
        /// BTNF7 Hide.
        /// </summary>
        public void HideBTNF7()
        {
            this.btnF7.Visible = false;
        }
        /// <summary>
        /// BTNF7 Enable.
        /// </summary>
        public void EnableBTNF7()
        {
            this.btnF7.Enabled = true;
        }
        /// <summary>
        /// BTNF7 Disable.
        /// </summary>
        public void DisableBTNF7()
        {
            this.btnF7.Enabled = false;
        }
        #endregion
        #region BTNF8 Define
        /// <summary>
        /// BTNF8 Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param> 
        public virtual void BTNF8_Click(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// BTNF8 Show.
        /// </summary>
        /// <param name="textlabel">Lable to show to screen of the button</param>
        ///<param name="imgname">Image name to show</param>
        public void ShowBTNF8(string textlabel, string imgname)
        {
            this.btnF8.Visible = true;
            this.btnF8.Text = textlabel;
            this.btnF8.Image = getImage(imgname);
            this.btnF8.Tooltip = textlabel;
        }
        /// <summary>
        /// BTNF8 Hide.
        /// </summary>
        public void HideBTNF8()
        {
            this.btnF8.Visible = false;
        }
        /// <summary>
        /// BTNF8 Enable.
        /// </summary>
        public void EnableBTNF8()
        {
            this.btnF8.Enabled = true;
        }
        /// <summary>
        /// BTNF8 Disable.
        /// </summary>
        public void DisableBTNF8()
        {
            this.btnF8.Enabled = false;
        }
        #endregion
        #region BTNF9 Define
        /// <summary>
        /// BTNF9 Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param> 
        public virtual void BTNF9_Click(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// BTNF9 Show.
        /// </summary>
        /// <param name="textlabel">Lable to show to screen of the button</param>
        ///<param name="imgname">Image name to show</param>
        public void ShowBTNF9(string textlabel, string imgname)
        {
            this.btnF9.Visible = true;
            this.btnF9.Text = textlabel;
            this.btnF9.Image = getImage(imgname);
            this.btnF9.Tooltip = textlabel;
        }
        /// <summary>
        /// BTNF9 Hide.
        /// </summary>
        public void HideBTNF9()
        {
            this.btnF9.Visible = false;
        }
        /// <summary>
        /// BTNF9 Enable.
        /// </summary>
        public void EnableBTNF9()
        {
            this.btnF9.Enabled = true;
        }
        /// <summary>
        /// BTNF9 Disable.
        /// </summary>
        public void DisableBTNF9()
        {
            this.btnF9.Enabled = false;
        }
        #endregion
        #region BTNF10 Define
        /// <summary>
        /// BTNF10 Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param> 
        public virtual void BTNF10_Click(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// BTNF10 Show.
        /// </summary>
        /// <param name="textlabel">Lable to show to screen of the button</param>
        ///<param name="imgname">Image name to show</param>
        public void ShowBTNF10(string textlabel, string imgname)
        {
            this.btnF10.Visible = true;
            this.btnF10.Text = textlabel;
            this.btnF10.Image = getImage(imgname);
            this.btnF10.Tooltip = textlabel;
        }
        /// <summary>
        /// BTNF10 Hide.
        /// </summary>
        public void HideBTNF10()
        {
            this.btnF10.Visible = false;
        }
        /// <summary>
        /// BTNF10 Enable.
        /// </summary>
        public void EnableBTNF10()
        {
            this.btnF10.Enabled = true;
        }
        /// <summary>
        /// BTNF10 Disable.
        /// </summary>
        public void DisableBTNF10()
        {
            this.btnF10.Enabled = false;
        }
        #endregion
        #region BTNF11 Define
        /// <summary>
        /// BTNF11 Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param> 
        public virtual void BTNF11_Click(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// BTNF11 Show.
        /// </summary>
        /// <param name="textlabel">Lable to show to screen of the button</param>
        ///<param name="imgname">Image name to show</param>
        public void ShowBTNF11(string textlabel, string imgname)
        {
            this.btnF11.Visible = true;
            this.btnF11.Text = textlabel;
            this.btnF11.Image = getImage(imgname);
            this.btnF11.Tooltip = textlabel;
        }
        /// <summary>
        /// BTNF11 Hide.
        /// </summary>
        public void HideBTNF11()
        {
            this.btnF11.Visible = false;
        }
        /// <summary>
        /// BTNF11 Enable.
        /// </summary>
        public void EnableBTNF11()
        {
            this.btnF11.Enabled = true;
        }
        /// <summary>
        /// BTNF11 Disable.
        /// </summary>
        public void DisableBTNF11()
        {
            this.btnF11.Enabled = false;
        }
        #endregion
        #region BTNF12 Define
        /// <summary>
        /// BTNF12 Click.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param> 
        public virtual void BTNF12_Click(object sender, EventArgs e)
        {

        }
        /// <summary>
        /// BTNF12 Show.
        /// </summary>
        /// <param name="textlabel">Lable to show to screen of the button</param>
        ///<param name="imgname">Image name to show</param>
        public void ShowBTNF12(string textlabel, string imgname)
        {
            this.btnF12.Visible = true;
            this.btnF12.Text = textlabel;
            this.btnF12.Image = getImage(imgname);
            this.btnF12.Tooltip = textlabel;
        }
        /// <summary>
        /// BTNF12 Hide.
        /// </summary>
        public void HideBTNF12()
        {
            this.btnF12.Visible = false;
        }
        /// <summary>
        /// BTNF12 Enable.
        /// </summary>
        public void EnableBTNF12()
        {
            this.btnF12.Enabled = true;
        }
        /// <summary>
        /// BTNF12 Disable.
        /// </summary>
        public void DisableBTNF12()
        {
            this.btnF12.Enabled = false;
        }
        #endregion

        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            switch (keyData)
            {
                case Keys.Escape:
                    BTNESC_Click(null, null);
                    break;
                case Keys.F1:
                    BTNF1_Click(null, null);
                    break;
                case Keys.F2:
                    BTNF2_Click(null, null);
                    break;
                case Keys.F3:
                    BTNF3_Click(null, null);
                    break;
                case Keys.F4:
                    BTNF4_Click(null, null);
                    break;
                case Keys.F5:
                    BTNF5_Click(null, null);
                    break;
                case Keys.F6:
                    BTNF6_Click(null, null);
                    break;
                case Keys.F7:
                    BTNF7_Click(null, null);
                    break;
                case Keys.F8:
                    BTNF8_Click(null, null);
                    break;
                case Keys.F9:
                    BTNF9_Click(null, null);
                    break;
                case Keys.F10:
                    BTNF10_Click(null, null);
                    break;
                case Keys.F11:
                    BTNF11_Click(null, null);
                    break;
                case Keys.F12:
                    BTNF12_Click(null, null);
                    break;
                default:
                    break;
            }
            return base.ProcessCmdKey(ref msg, keyData);
        }
        protected DialogResult MsgBox(string strText, MessageBoxButtons msgbxButton, MessageBoxIcon msgbxIcon, MessageBoxDefaultButton msgbxdfButton, MessageBoxOptions msgbxOptions)
        {
            return MessageBox.Show(strText, "Hong Phuc Gold", msgbxButton, msgbxIcon, msgbxdfButton, msgbxOptions);
        }
       
        protected DialogResult MsgBox(string strText, MessageBoxButtons msgbxButton, MessageBoxDefaultButton msgbxdfButton, MessageBoxIcon msgbxIcon)
        {
            return MessageBox.Show(strText, "Hong Phuc Gold", msgbxButton, msgbxIcon, msgbxdfButton);
        }
        protected DialogResult MsgBox(string strText, MessageBoxButtons msgbxButton, MessageBoxIcon msgbxIcon)
        {
            return MessageBox.Show(strText, "Hong Phuc Gold", msgbxButton, msgbxIcon);
        }
        protected DialogResult MsgBox(string strText, MessageBoxButtons msgbxButton)
        {
            return MessageBox.Show(strText, "Hong Phuc Gold", msgbxButton);
        }
        protected DialogResult MsgBox(string strText)
        {
            return MessageBox.Show(strText, "Hong Phuc Gold");
        }

        private void MDICHILD_FormClosed(object sender, FormClosedEventArgs e)
        {
            if (HasChange)
            {
                if (DoClose())
                {
                    SaveChange();
                }
            }
        }
        protected virtual bool DoClose()
        {
            //if (MsgBox("Du Lieu Da Thay Doi? Ban Co Muon Luu Lai khong?",MessageBoxButtons.YesNo, MessageBoxDefaultButton.Button1, MessageBoxIcon.Question) = DialogResult.Yes)
            //{ 

            //}
            return true;
        }
        protected virtual void SaveChange()
        { 
        }
    }
}